package com.example.tianling.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.tianling.common.params.CreateRoomDo;
import com.example.tianling.entity.MatchEntity;
import com.example.tianling.entity.RoomEntity;
import com.example.tianling.entity.UserEntity;

import java.text.ParseException;

public interface RoomService extends IService<RoomEntity> {
    // 匹配相关
    RoomEntity createRoom(Integer userId, String type);

    // 房间内相关
    RoomEntity getRoom(Integer roomId);
    void updateRoomHost(Integer roomId, Integer userId);
    void updateRealNumber(Integer roomId, Integer realNumber);
    void removeRoom(Integer roomId);
    void updateRoomState(String roomId, int roomState);
    void updateIsMatch(Integer roomId, Integer isMatch);
    void updateBookId(Integer roomId, Integer bookId);


    // 创建房间相关
    RoomEntity insertRoomByCreate(CreateRoomDo createRoomDo, UserEntity user);
    RoomEntity insertReserveRoom(CreateRoomDo createRoomDo, Integer userId) throws ParseException;


}
